Add ServiceBusJmsConnectionFactoryClassProvider for custom factory injection#47161
Add ServiceBusJmsConnectionFactoryClassProvider for custom factory injection#47161Copilot wants to merge 4 commits into
Conversation
…factory injection Co-authored-by: saragluna <31124698+saragluna@users.noreply.github.com>
Co-authored-by: saragluna <31124698+saragluna@users.noreply.github.com>
Co-authored-by: saragluna <31124698+saragluna@users.noreply.github.com>
|
Hi @copilot. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
2 similar comments
|
Hi @copilot. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
|
Hi @copilot. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
|
Use this PR instead: #49676 |
Users need to inject custom subclasses of
ServiceBusJmsConnectionFactoryto extend JMS functionality beyond the standard implementation. The existing autoconfiguration hardcoded the factory class, preventing this customization.Changes
ServiceBusJmsConnectionFactoryClassProviderinterface - Functional interface in public API package allowing users to specify their desiredServiceBusJmsConnectionFactorysubclassServiceBusJmsConnectionFactoryConfiguration- UpdatedcreateServiceBusJmsConnectionFactory()to check for provider bean and use supplied class if available, defaulting to standard class otherwiseUsage
Implement the provider interface as a bean to inject your custom factory:
Custom class must extend
ServiceBusJmsConnectionFactoryand provide both constructors for connection string and passwordless authentication modes.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
login.microsoftonline.comoss.jfrog.org/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/azure-sdk-for-java/azure-sdk-for-java/sdk/spring/spring-cloud-azure-autoconfigure org.codehaus.plexus.classworlds.launcher.Launcher test -Dtest=ServiceBusJmsConnectionFactoryConfigurationTests -DfailIfNoTests=false(dns block)sample-propertysource.vault.azure.net/usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/REDACTED/work/azure-sdk-for-java/azure-sdk-for-java/sdk/spring/spring-cloud-azure-autoconfigure/target/spring-cloud-azure-autoconfigure-oom.hprof -XX:+CrashOnOutOfMemoryError --add-opens java.base/java.lang.invoke=com.azure.core org.apache.maven.surefire.booter.ForkedBooter /home/REDACTED/work/azure-sdk-for-java/azure-sdk-for-java/sdk/spring/spring-cloud-azure-autoconfigure/target/surefire 2025-11-05T03-57-12_406-jvmRun1 surefire-20251105035712479_1tmp surefire_0-20251105035712479_2tmp(dns block)sample.servicebus.windows.netsample.somelocation.eventgrid.azure.net/usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/REDACTED/work/azure-sdk-for-java/azure-sdk-for-java/sdk/spring/spring-cloud-azure-autoconfigure/target/spring-cloud-azure-autoconfigure-oom.hprof -XX:+CrashOnOutOfMemoryError --add-opens java.base/java.lang.invoke=com.azure.core org.apache.maven.surefire.booter.ForkedBooter /home/REDACTED/work/azure-sdk-for-java/azure-sdk-for-java/sdk/spring/spring-cloud-azure-autoconfigure/target/surefire 2025-11-05T03-57-12_406-jvmRun1 surefire-20251105035712479_1tmp surefire_0-20251105035712479_2tmp(dns block)sample.vault.azure.net/usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/REDACTED/work/azure-sdk-for-java/azure-sdk-for-java/sdk/spring/spring-cloud-azure-autoconfigure/target/spring-cloud-azure-autoconfigure-oom.hprof -XX:+CrashOnOutOfMemoryError --add-opens java.base/java.lang.invoke=com.azure.core org.apache.maven.surefire.booter.ForkedBooter /home/REDACTED/work/azure-sdk-for-java/azure-sdk-for-java/sdk/spring/spring-cloud-azure-autoconfigure/target/surefire 2025-11-05T03-57-12_406-jvmRun1 surefire-20251105035712479_1tmp surefire_0-20251105035712479_2tmp(dns block)test-namespace.servicebus.windows.netIf you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.